<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
		"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/html">
<head>
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<title>广告管理</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0"><!-- 确保适当的绘制和触屏缩放 -->
	<link rel="stylesheet" href="{$url_css}bootstrap.min.css" type="text/css">
	<link rel="stylesheet" href="{$url_css}admin.css" type="text/css">
	<script type="text/javascript" src="{$url_js}jquery-2.2.0.min.js"></script>
	<script type="text/javascript" src="{$url_js}bootstrap.min.js"></script>

	<link rel="stylesheet" href="{$url_css}sweet-alert.css"/>
	<script type="text/javascript" src="{$url_js}sweet-alert.min.js"></script>

	<style type="text/css">
		{literal}
		.page_info div {
			display: inline-block;
		}

		.page_info .p_l {
			color: #666;
			float: left;
			line-height: 69px;
			font-size: 16px;
		}

		.page_info .p_r {
			color: #337AB7;
			float: right;
		}

		{/literal}
	</style>
</head>
<body>

<div class="container" style="width:96%">
	<form action="?do=Default" method="get">
		<table class="table table-bordered table-striped" align="center">
			<tr>
				<td colspan="4">查询条件</td><td align="center"><a class="btn btn-warning" href="?do=Add">添加广告</a></td>
			</tr>
			<tr>
				<td class="form-group col-xs-2">
					<div class="input-group">
						<div class="input-group-addon">商家ID</div>
						<input type="text" class="form-control" name="ShopId" placeholder="商家ID"
						       value="{$param['ShopId']}">
					</div>
				</td>
				<td class="form-group col-xs-2">
					<div class="input-group">
						<div class="input-group-addon">广告标题</div>
						<input type="text" class="form-control" name="Title" placeholder="广告标题"
						       value="{$param['Title']}">
					</div>
				</td>
				{*<td class="form-group col-xs-2">*}
					{*<div class="input-group">*}
						{*<div class="input-group-addon">关键词</div>*}
						{*<input type="text" class="form-control" name="Keywords" placeholder="关键词"*}
						       {*value="{$param['Keywords']}">*}
					{*</div>*}
				{*</td>*}
				{*<td class="form-group col-xs-2">*}
					{*<div class="input-group">*}
						{*<div class="input-group-addon">广告类型</div>*}
						{*<select class="form-control" style="width: 100px;" name="AdType">*}
								{*<option value="0">所有</option>*}
								{*<option value="1" {if $param['AdType'] == 1}selected{/if}>竞价</option>*}
								{*<option value="2" {if $param['AdType'] == 2}selected{/if}>按次</option>*}
							{*</select>*}
						{*</select>*}
					{*</div>*}
				{*</td>*}
				<td class="form-group col-xs-2">
					<div class="input-group">
						<div class="input-group-addon">状态</div>
						<select id="Status" name="Status" class="form-control" style="width: 100px;">
							<option value="0">所有</option>
							<option value="1" {if $param['Status'] == 1}selected{/if}>正常</option>
							<option value="2" {if $param['Status'] == 2}selected{/if}>失效</option>
						</select>
					</div>
				</td>
				<td class="form-group col-xs-2" align="right">
					<input type="submit" value="搜索" class="btn btn-primary"/>
				</td>
			</tr>
		</table>
	</form>
</div>

<div class="container" style="width:96%">
	<table class="table table-bordered table-striped" align="center">
		<thead>
		<tr>
			<th>ID</th>
			<th>商家ID</th>
			<th>广告标题</th>
			<th>有效开始时间</th>
			<th>有效结束时间</th>
			{*<th>类型</th>*}
			<th>排名</th>
			{*<th>状态</th>*}
			<th>操 作</th>
		</tr>
		</thead>
		<tbody>
		{foreach $list  as $k=> $v}
			<tr style="height: 60px; overflow: hidden">
				<td>{$v['Id']}</td>
				<td>{$v['ShopId']}</td>
				<td>{$v['Title']}</td>
				<td>{$v['StartTime']}</td>
				<td>{$v['EndTime']}</td>
				{*<td>{$adtype[$v['AdType']]}</td>*}
				<td>{$v['Order']}</td>
				{*<td>{$status[$v.Status]}</td>*}
				<td align="center">
					<a href="?do=Edit&Id={$v['Id']}" class="btn btn-default">修改</a>
				</td>
			</tr>
		{/foreach}
		<tr>
			<td colspan="11" align="right">
				<div class="page_info">
					{if $page_info['count']}
						<div class="p_l">一共 {$page_info['count']} 条数据,共 {$page_info['page']} 页</div>
					{/if}
					<div class="p_r">{$pagination}</div>
				</div>
			</td>
		</tr>
		</tbody>
	</table>
</div>
</body>
</html>